package 双端队列.链表实现;

public class Test {
    public static void main(String[] args) {
        LinkedListDeque<Integer> deque = new LinkedListDeque<>(3);
        System.out.println(deque.offerFirst(1));
        System.out.println(deque.offerFirst(2));
        System.out.println(deque.offerLast(3));
        System.out.println(deque.offerFirst(4));
        System.out.println();
        for (Integer i : deque) {
            System.out.println(i);
        }
        System.out.println();
        System.out.println(deque.peekFirst());
        System.out.println(deque.peekLast());
        System.out.println();
        System.out.println(deque.pollFirst());
        System.out.println(deque.pollLast());
        for (Integer i : deque) {
            System.out.println(i);
        }
    }
}
